/**
 *  在设置数据源之前， 你可以使用 autoGenerateColumns 方法来控制是否自动生成绑定列。
 *      var customers = [
 *        { ID:0, Name:'A', Info1:'Info0' },
 *        { ID:1, Name:'B', Info1:'Info1' },
 *        { ID:2, Name:'C', Info1:'Info2' },
 *     ];
 *     sheet.autoGenerateColumns = true;
 *     sheet.setDataSource(customers);
 */

/**
 * 使用 getDataItem 方法来获取指定行的数据信息。
 *     var datasource = [
 *        { name: 'Alice', age: 27, birthday: '1985/08/31', position: 'PM' }
 *     ];
 *     // bindColumn one by one
 *     var nameColInfo = { name: 'name', displayName: 'Display Name', size: 70 };
 *     var ageColInfo = { name: 'age', displayName: 'Age', size: 40, resizable: false };
 *     var birthdayColInfo = { name: 'birthday', displayName: 'Birthday', formatter: 'd/M/yy', size: 120 };
 *     var positionColInfo = { name: 'position', displayName: 'Position', size: 50, visible: false };
 *     sheet.autoGenerateColumns = false;
 *     sheet.setDataSource(datasource);
 *     sheet.bindColumn(0, nameColInfo);
 *     sheet.bindColumn(1, birthdayColInfo);
 *     sheet.bindColumn(2, ageColInfo);
 *     sheet.bindColumn(3, positionColInfo);
 *
 *     // or use bindColumns to bind all custom columns
 *     var colInfos = [
 *        { name: 'position', displayName: 'Position', size: 50, visible: false },
 *        { name: 'name', displayName: 'Display Name', size: 70 },
 *        { name: 'birthday', displayName: 'Birthday', formatter: 'd/M/yy', size: 120 },
 *        { name: 'age', displayName: 'Age', size: 40, resizable: false },
 *     ];
 *     sheet.autoGenerateColumns = false;
 *     sheet.setDataSource(datasource);
 *     sheet.bindColumns(colInfos);
 */

/**
 * 创建一个单元格级别绑定的数据源, 然后使用 setBindingPath 方法来设置绑定路径到指定的单元格，并将数据源设置到表单上。
 *     var person = { name: 'Wang feng', age: 25, sex: 'male', address: { postcode: '710075' } };
 *     var source = new GC.Spread.Sheets.Bindings.CellBindingSource(person);
 *     sheet.setBindingPath(2, 1, 'name');
 *     sheet.setBindingPath(3, 1, 'age');
 *     sheet.setBindingPath(4, 1, 'sex');
 *     sheet.setBindingPath(5, 1, 'address.postcode');
 *     sheet.setDataSource(source);
 */